package org.budo.cmbc.direct.sdk.entity;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * @author lmw
 */
@Getter
@Setter
@Accessors(chain = true)
@NoArgsConstructor
public class MEAccountOpenQueryResponse extends AbstractCmbcDirectResponse {
    private static final long serialVersionUID = 1808855649022694657L;

    private String queryStatus;

    private String channelJnlNo;

    private String eProtocolAcNo;

    private String eAcNo;

    private String openDate;

    private String openCode;

    private String openMessage;

    private String shadowEProtocolAcNo;

    private String shadowEAcNo;

    public MEAccountOpenQueryResponse(String channelJnlNo, String responseJson) {
        super(channelJnlNo, responseJson);

        JSONObject json = JSON.parseObject(responseJson);
        this.setQueryStatus(json.getString("QueryStatus")).setChannelJnlNo(json.getString("ChannelJnlNo")).setEProtocolAcNo(json.getString("EProtocolAcNo")).setEAcNo(json.getString("EAcNo")).setOpenDate(json.getString("OpenDate")).setOpenCode(json.getString("OpenCode")).setOpenMessage(json.getString("OpenMessage")).setShadowEAcNo(json.getString("ShadowEAcNo")).setShadowEProtocolAcNo(json.getString("ShadowEProtocolAcNo"));

    }
}